package cn.iocoder.yudao.module.system.videostore.dto.product;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.io.Serializable;

@Data
public class SkusDTO implements Serializable {

    @Schema(description = "商家自定义sku_id，小店后台不作任何唯一性约束，开发者自行保证，一旦添加成功后该字段无法修改，最多128字符",
            requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "")
    private String out_sku_id;

    @Schema(description = "sku小图",
            requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "")
    private String thumb_img;

    @Schema(description = "售卖价格，以分为单位，不超过1000000000（1000万元）", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "售卖价格不能为空")
    private Integer sale_price;

    @Schema(description = "库存", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "库存不能为空")
    private Integer stock_num;

    @Schema(description = "sku编码，最多100字符",
            requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "")
    private String sku_code;

    @Schema(description = "销售属性，每个spu下面的第一个sku的sku_attr.key顺序决定商品详情页规格名称的排序。部分类目有必填的销售属性，具体参考文档获取类目信息中的字段attr.sale_attr_list[].is_required", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "销售属性不能为空")
    private SkuAttrsDTO[] sku_attrs;

    @Schema(description = "sku_deliver_info",
            requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "")
    private SkuDeliverInfoDTO sku_deliver_info;

}
